package com.ruoyi.spin.domain.resp;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * @author houfy
 * @date 2023/1/14 22:31
 */
@NoArgsConstructor
@Data
public class DailySpinRspDTO implements Serializable {

  @JsonProperty("success")
  private Boolean success;

  @JsonProperty("data")
  private List<DataDTO> data;

  @JsonProperty("errKey")
  private String errKey;

  @JsonProperty("code")
  private Integer code;

  @JsonProperty("msg")
  private String msg;

  @JsonProperty("currentTime")
  private Long currentTime;

  @NoArgsConstructor
  @Data
  public static class DataDTO {
    @JsonProperty("date")
    private String date;

    @JsonProperty("rewards")
    private List<RewardsDTO> rewards;

    @JsonProperty("comments")
    private List<CommentsDTO> comments;

    @NoArgsConstructor
    @Data
    public static class RewardsDTO {
      @JsonProperty("id")
      private Integer id;

      @JsonProperty("desc")
      private String desc;

      @JsonProperty("link")
      private String link;

      @JsonProperty("genTime")
      private String genTime;

      @JsonProperty("tke")
      private String tke;
    }

    @NoArgsConstructor
    @Data
    public static class CommentsDTO {
      @JsonProperty("username")
      private String username;

      @JsonProperty("createTime")
      private String createTime;

      @JsonProperty("content")
      private String content;
    }
  }
}
